Descriptive Statistics: Two Variables
Tao Lin
Office Hours: Fri 1:30 - 3:30 PM Smith 35
Section Slides URL: soxv/CSSS-321-Labs
Agenda
Survey Sampling
Correlation
Quantile-Quantile Plot
Deciphering Problem Set 2
Source: Groves et al. 2009
Agenda
Survey Sampling
Correlation
Quantile-Quantile Plot
Deciphering Problem Set 2
\begin{aligned} \text{Corr}(x, y) =& \frac{\text{Cov}(x, y)}{\sigma_x \sigma_y} \\ =& \frac{\frac{1}{n-1}\sum_{i=1}^n [(x_i - \bar{x}) (y_i - \bar{y})]}{\sigma_x \sigma_y} \\ =& \frac{1}{n-1}\sum_{i=1}^n [\text{z-score}(x) \times \text{z-score}(y)] \end{aligned}
Agenda
Survey Sampling
Correlation
Quantile-Quantile Plot
Deciphering Problem Set 2
Agenda
Survey Sampling
Correlation
Quantile-Quantile Plot
Deciphering Problem Set 2
| Name | Description |
|---|---|
name |
The judge’s name |
child |
The number of children each judge has. |
circuit.1 |
Which federal circuit the judge serves in. |
girls |
The number of female children the judge has. |
progressive.vote |
The proportion of the judge’s votes on women’s issues which were decided in a pro-feminist direction. |
race |
The judge’s race (1 = white, 2 = African-American, 3 = Hispanic, 4 = Asian-American). |
religion |
The judge’s religion (1 = Unitarian, 2 = Episcopalian, 3 = Baptist, 4 = Catholic, 5 = Jewish, 7 = Presbyterian, 8 = Protestant, 9 = Congregationalist, 10 = Methodist, 11 = Church of Christ, 16 = Baha’i, 17 = Mormon, 21 = Anglican, 24 = Lutheran, 99 = unknown). |
republican |
Takes a value of 1 if the judge was appointed by a Republican president, 0 otherwise. Used as a proxy for the judge’s party. |
sons |
The number of male children the judge has. |
woman |
Takes a value of 1 if the judge is a woman, 0 otherwise. |
X |
Indicator for the observation number. |
yearb |
The year the judge was born. |
progressive.vote - The proportion of the judge’s votes on women’s issues which were decided in a pro-feminist direction.progressive.vote and two confounders - republican and womanprogressive.vote and two confounders - whether a judge has at least one child and republicanprogressive.vote and explanatory variable - whether a judge has at least one daughter, conditional on the total number of children
progressive.vote?progressive.vote?progressive.vote.progressive.vote across 4 groups: Republican men, Republican women, Democratic men, Democratic women. (Hint: y ~ x1 + x2 in boxplot())progressive.vote between judges who have at least one child and those who don’t.progressive.vote between Republican and Democratic parents.
tapply(..., list(..., ...), mean)progressive.vote between judges who have at least one daughter and those who don’t have any.tapply(..., list(..., ...), mean)Conditional on the number of children, the number of daughters a judge has is random. How can we evaluate the validity of this assumption?
girls across judges with different number of children.girls across judges, divided by other potential confounders in the data.
CSSS/SOC/STAT 321 bostona Science and Statistics for Social Scicence I